<?php

namespace app\merchants\services;


use yiqiniu\extend\facade\Logger;

class CallbackService extends BaseService
{
    /**
     * 支付成功
     * @param array  $notify_data
     * @param string $errorMsg
     * @return bool
     */

    public function pay_success(array $notify_data, string &$errorMsg): bool
    {
        if (empty($notify_data['out_order_no']) || empty($notify_data['pay_order_no'])) {
            $errorMsg = 'out_order_no 或 pay_order_no 为空';
            return false;
        }
        $result = false;
        try {
            // 调用线上付款
            //   $result = ModelCustomer::CustomerPayLog()->onlinePaySuccess($notify_data['out_order_no'], $notify_data['pay_order_no']);

        } catch (Exception $e) {
            Logger::exception($e);
            $errorMsg = "success";
        }
        return $result;
    }
}